package com.hitqz.robot.api.business.dto;

import lombok.Data;

import java.awt.*;

/**
 * 外设控制按钮
 */
@Data
public class RobotEquipmentControlButtonDto {
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 操作
	 */
	private String action;

	private boolean isLongClick;

	private String postType = "post";

	private Object param;

	private String dataType = "json";

	private String showBtnPicUrl;

	private String clickedBtnPicUrl;

	private String mapAction;

	private String iconNotAllow;


    public static RobotEquipmentControlButtonDto createButton(String name, String postType, String action, String param, String picUrl, String picUrlP, String picUrlS, boolean isLongClick) {
        RobotEquipmentControlButtonDto button = new RobotEquipmentControlButtonDto();
        button.setName(name);
        button.setAction(action);
        button.setLongClick(isLongClick);
        button.setPostType(postType);
        button.setParam(param);
        button.setDataType("json");
        button.setShowBtnPicUrl(picUrl);
        button.setClickedBtnPicUrl(picUrlP);
        button.setIconNotAllow(picUrlS);
        button.setMapAction("");
        return button;
    }

}
